<div class="container">
  <h1>list()</h1>
  <p class="signature"> function list(bool $recursive = false): array </p>
  <h2>Description</h2>
  <div class="description">
    <p>Lists all existing modules.</p>
  </div>
  <h2>Parameters</h2>
  <table>
    <thead>
      <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        <th>Default</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>$recursive</td>
        <td>bool</td>
        <td>Optional. Determines whether the listing should be recursive. Default is false.</td>
        <td>false</td>
      </tr>
    </tbody>
  </table>
  <h2>Return Value</h2>
  <table>
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>array</td>
        <td>Returns an array containing the list of existing modules.</td>
      </tr>
    </tbody>
  </table>
  <h2>Example Usage</h2>
  <div class="example">
    <pre>
$existing_modules = $this->modules->list(true);
json($existing_modules);
// Output: Array containing the list of existing modules</pre>
  </div>
</div>
